WORKERS AHEAD!
You are viewing the development documentation for the Apereo CAS server. The functionality presented here is not officially released yet. This is a work in progress and will be continually updated as development moves forward. You are most encouraged to test the changes presented.
To view the documentation for a specific Apereo CAS server release, please choose an appropriate version. The release schedule is available here.Webflow Session
CAS uses Spring Webflow to manage the authentication sequence. Spring Webflow provides a pluggable architecture whereby various actions, decisions and operations throughout the primary authentication workflow can be easily controlled and navigated. In order for this navigation to work, some form of conversational session state must be maintained.
Provides information about the application’s HTTP sessions that are managed by Spring Session.
|
org.springframework.boot.actuate.session.SessionsEndpoint |
Provides information about the application’s HTTP sessions that are managed by Spring Session.
SessionsReport |
|
org.springframework.boot.actuate.session.SessionsEndpoint |
Provides information about the application’s HTTP sessions that are managed by Spring Session.
SessionDescriptor |
|
org.springframework.boot.actuate.session.SessionsEndpoint |
Client-side Sessions
CAS provides a facility for storing flow execution state on the client in Spring Webflow. Flow state is stored as an encoded byte stream in the flow execution identifier provided to the client when rendering a view. By default, CAS automatically attempts to store and keep track of this state on the client in an encrypted form via encryption and signing keys to remove the need for session cleanup, termination and replication.
The following settings and properties are available from the CAS configuration catalog:
cas.webflow.crypto.encryption.key=
The encryption key. The encryption key by default and unless specified otherwise must be randomly-generated string whose length is defined by the encryption key size setting. |
cas.webflow.crypto.signing.key=
The signing key is a JWT whose length is defined by the signing key size setting. |
cas.webflow.crypto.alg=AES
The signing/encryption algorithm to use. |
cas.webflow.crypto.enabled=true
Whether crypto operations are enabled. |
cas.webflow.crypto.encryption.key-size=16
Encryption key size. |
cas.webflow.crypto.signing.key-size=512
The signing key size. |
cas.webflow.session.compress=false
Whether or not the snapshots should be compressed. |
cas.webflow.session.hz-location=
If sessions are to be replicated via Hazelcast, defines the location of a |
cas.webflow.session.lock-timeout=PT30S
Sets the time period that can elapse before a timeout occurs on an attempt to acquire a conversation lock. The default is 30 seconds. Only relevant if session storage is done on the server. This settings supports the
|
cas.webflow.session.max-conversations=5
Using the maxConversations property, you can limit the number of concurrently active conversations allowed in a single session. If the maximum is exceeded, the conversation manager will automatically end the oldest conversation. The default is 5, which should be fine for most situations. Set it to -1 for no limit. Setting maxConversations to 1 allows easy resource cleanup in situations where there should only be one active conversation per session. Only relevant if session storage is done on the server. |
cas.webflow.session.storage=false
Controls whether spring webflow sessions are to be stored server-side or client side. By default state is managed on the client side, that is also signed and encrypted. |
cas.webflow.crypto.encryption.key=
The encryption key. The encryption key by default and unless specified otherwise must be randomly-generated string whose length is defined by the encryption key size setting. |
cas.webflow.crypto.signing.key=
The signing key is a JWT whose length is defined by the signing key size setting. |
cas.webflow.crypto.alg=AES
The signing/encryption algorithm to use. |
cas.webflow.crypto.enabled=true
Whether crypto operations are enabled. |
cas.webflow.crypto.encryption.key-size=16
Encryption key size. |
cas.webflow.crypto.signing.key-size=512
The signing key size. |
This CAS feature is able to accept signing and encryption crypto keys. In most scenarios if keys are not provided, CAS will auto-generate them. The following instructions apply if you wish to manually and beforehand create the signing and encryption keys.
Note that if you are asked to create a JWK of a certain size for the key, you are to use the following set of commands to generate the token:
1
2
wget https://raw.githubusercontent.com/apereo/cas/master/etc/jwk-gen.jar
java -jar jwk-gen.jar -t oct -s [size]
The outcome would be similar to:
1
2
3
4
5
{
"kty": "oct",
"kid": "...",
"k": "..."
}
The generated value for k needs to be assigned to the relevant CAS settings. Note that keys generated via
the above algorithm are processed by CAS using the Advanced Encryption Standard (AES) algorithm which is a
specification for the encryption of electronic data established by the U.S. National Institute of Standards and Technology.
Configuration Metadata
The collection of configuration properties listed in this section are automatically generated from the CAS source and components that contain the actual field definitions, types, descriptions, modules, etc. This metadata may not always be 100% accurate, or could be lacking details and sufficient explanations.
Be Selective
This section is meant as a guide only. Do NOT copy/paste the entire collection of settings into your CAS configuration; rather pick only the properties that you need. Do NOT enable settings unless you are certain of their purpose and do NOT copy settings into your configuration only to keep them as reference. All these ideas lead to upgrade headaches, maintenance nightmares and premature aging.
YAGNI
Note that for nearly ALL use cases, declaring and configuring properties listed here is sufficient. You should NOT have to explicitly massage a CAS XML/Java/etc configuration file to design an authentication handler, create attribute release policies, etc. CAS at runtime will auto-configure all required changes for you. If you are unsure about the meaning of a given CAS setting, do NOT turn it on without hesitation. Review the codebase or better yet, ask questions to clarify the intended behavior.
Naming Convention
Property names can be specified in very relaxed terms. For instance cas.someProperty, cas.some-property, cas.some_property are all valid names. While all forms are accepted by CAS, there are certain components (in CAS and other frameworks used) whose activation at runtime is conditional on a property value, where this property is required to have been specified in CAS configuration using kebab case. This is both true for properties that are owned by CAS as well as those that might be presented to the system via an external library or framework such as Spring Boot, etc. When possible, properties should be stored in
lower-case kebab format, such as cas.property-name=value.S ettings and properties that are controlled by the CAS platform directly always begin with the prefix cas. All other settings are controlled and provided to CAS via other underlying frameworks and may have their own schemas and syntax. BE CAREFUL with the distinction. Unrecognized properties are rejected by CAS and/or frameworks upon which CAS depends. This means if you somehow misspell a property definition or fail to adhere to the dot-notation syntax and such, your setting is entirely refused by CAS and likely the feature it controls will never be activated in the way you intend.
Validation
Configuration properties are automatically validated on CAS startup to report issues with configuration binding, specially if defined CAS settings cannot be recognized or validated by the configuration schema. The validation process is on by default and can be skipped on startup using a special system property SKIP_CONFIG_VALIDATION that should be set to true. Additional validation processes are also handled via Configuration Metadata and property migrations applied automatically on startup by Spring Boot and family.
Indexed Settings
CAS settings able to accept multiple values are typically documented with an index, such as cas.some.setting[0]=value. The index [0] is meant to be incremented by the adopter to allow for distinct multiple configuration blocks.
In the event that keys are not generated by the deployer, CAS will attempt to auto-generate keys and will output the result for each respected key. The deployer MUST attempt to copy the generated keys to their CAS properties file, specially when running a multi-node CAS deployment. Failure to do so will prevent CAS to appropriate decrypt and encrypt the webflow state and will prevent successful single sign-on.
While the above settings are all optional, it is recommended that you provide your own configuration and settings for encrypting and transcoding of the web session state.
Server-side Sessions
In the event that you wish to use server-side session storage for managing t he webflow session, you will need to enable this behavior via CAS properties.
The following settings and properties are available from the CAS configuration catalog:
cas.webflow.session.compress=false
Whether or not the snapshots should be compressed. |
cas.webflow.session.hz-location=
If sessions are to be replicated via Hazelcast, defines the location of a |
cas.webflow.session.lock-timeout=PT30S
Sets the time period that can elapse before a timeout occurs on an attempt to acquire a conversation lock. The default is 30 seconds. Only relevant if session storage is done on the server. This settings supports the
|
cas.webflow.session.max-conversations=5
Using the maxConversations property, you can limit the number of concurrently active conversations allowed in a single session. If the maximum is exceeded, the conversation manager will automatically end the oldest conversation. The default is 5, which should be fine for most situations. Set it to -1 for no limit. Setting maxConversations to 1 allows easy resource cleanup in situations where there should only be one active conversation per session. Only relevant if session storage is done on the server. |
cas.webflow.session.storage=false
Controls whether spring webflow sessions are to be stored server-side or client side. By default state is managed on the client side, that is also signed and encrypted. |
spring.session.hazelcast.flush-mode=on-save
Sessions flush mode. Determines when session changes are written to the session store. |
spring.session.hazelcast.map-name=spring:session:sessions
Name of the map used to store sessions. |
spring.session.hazelcast.save-mode=on-set-attribute
Sessions save mode. Determines how session changes are tracked and saved to the session store. |
spring.session.jdbc.cleanup-cron=0 * * * * *
Cron expression for expired session cleanup job. |
spring.session.jdbc.flush-mode=on-save
Sessions flush mode. Determines when session changes are written to the session store. |
spring.session.jdbc.initialize-schema=embedded
Database schema initialization mode. |
spring.session.jdbc.save-mode=on-set-attribute
Sessions save mode. Determines how session changes are tracked and saved to the session store. |
spring.session.jdbc.schema=classpath:org/springframework/session/jdbc/schema-@@platform@@.sql
Path to the SQL file to use to initialize the database schema. |
spring.session.jdbc.table-name=SPRING_SESSION
Name of the database table used to store sessions. |
spring.session.mongodb.collection-name=sessions
Collection name used to store sessions. |
spring.session.redis.cleanup-cron=0 * * * * *
Cron expression for expired session cleanup job. |
spring.session.redis.configure-action=notify-keyspace-events
The configure action to apply when no user defined ConfigureRedisAction bean is present. |
spring.session.redis.flush-mode=on-save
Sessions flush mode. Determines when session changes are written to the session store. |
spring.session.redis.namespace=spring:session
Namespace for keys used to store sessions. |
spring.session.redis.save-mode=on-set-attribute
Sessions save mode. Determines how session changes are tracked and saved to the session store. |
spring.session.servlet.filter-dispatcher-types=asyncerrorrequest
Session repository filter dispatcher types. |
spring.session.servlet.filter-order=
Session repository filter order. |
spring.session.store-type=
Session store type. |
spring.session.timeout=
Session timeout. If a duration suffix is not specified, seconds will be used. |
Configuration Metadata
The collection of configuration properties listed in this section are automatically generated from the CAS source and components that contain the actual field definitions, types, descriptions, modules, etc. This metadata may not always be 100% accurate, or could be lacking details and sufficient explanations.
Be Selective
This section is meant as a guide only. Do NOT copy/paste the entire collection of settings into your CAS configuration; rather pick only the properties that you need. Do NOT enable settings unless you are certain of their purpose and do NOT copy settings into your configuration only to keep them as reference. All these ideas lead to upgrade headaches, maintenance nightmares and premature aging.
YAGNI
Note that for nearly ALL use cases, declaring and configuring properties listed here is sufficient. You should NOT have to explicitly massage a CAS XML/Java/etc configuration file to design an authentication handler, create attribute release policies, etc. CAS at runtime will auto-configure all required changes for you. If you are unsure about the meaning of a given CAS setting, do NOT turn it on without hesitation. Review the codebase or better yet, ask questions to clarify the intended behavior.
Naming Convention
Property names can be specified in very relaxed terms. For instance cas.someProperty, cas.some-property, cas.some_property are all valid names. While all forms are accepted by CAS, there are certain components (in CAS and other frameworks used) whose activation at runtime is conditional on a property value, where this property is required to have been specified in CAS configuration using kebab case. This is both true for properties that are owned by CAS as well as those that might be presented to the system via an external library or framework such as Spring Boot, etc. When possible, properties should be stored in
lower-case kebab format, such as cas.property-name=value.S ettings and properties that are controlled by the CAS platform directly always begin with the prefix cas. All other settings are controlled and provided to CAS via other underlying frameworks and may have their own schemas and syntax. BE CAREFUL with the distinction. Unrecognized properties are rejected by CAS and/or frameworks upon which CAS depends. This means if you somehow misspell a property definition or fail to adhere to the dot-notation syntax and such, your setting is entirely refused by CAS and likely the feature it controls will never be activated in the way you intend.
Validation
Configuration properties are automatically validated on CAS startup to report issues with configuration binding, specially if defined CAS settings cannot be recognized or validated by the configuration schema. The validation process is on by default and can be skipped on startup using a special system property SKIP_CONFIG_VALIDATION that should be set to true. Additional validation processes are also handled via Configuration Metadata and property migrations applied automatically on startup by Spring Boot and family.
Indexed Settings
CAS settings able to accept multiple values are typically documented with an index, such as cas.some.setting[0]=value. The index [0] is meant to be incremented by the adopter to allow for distinct multiple configuration blocks.
Doing so will likely require you to also enable sticky sessions and/or session replication in a clustered deployment of CAS.
Generally speaking, you do not need to enable server-side sessions unless you have a rather specialized deployment or are in need of features that store bits and pieces of data into a sever-backed session object. It is recommended that you stick with the default client-side session storage and only switch if and when mandated by a specific CAS behavior.
Hazelcast Session Replication
If you don’t wish to use the native container’s strategy for session replication, you can use CAS’s support for Hazelcast session replication.
This feature is enabled via the following module:
1
2
3
4
5
<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-support-session-hazelcast</artifactId>
<version>${cas.version}</version>
</dependency>
1
implementation "org.apereo.cas:cas-server-support-session-hazelcast:${project.'cas.version'}"
1
2
3
4
5
6
7
8
9
dependencyManagement {
imports {
mavenBom "org.apereo.cas:cas-server-support-bom:${project.'cas.version'}"
}
}
dependencies {
implementation "org.apereo.cas:cas-server-support-session-hazelcast"
}
The following settings and properties are available from the CAS configuration catalog:
cas.webflow.session.hz-location=
If sessions are to be replicated via Hazelcast, defines the location of a |
spring.session.hazelcast.flush-mode=on-save
Sessions flush mode. Determines when session changes are written to the session store. |
spring.session.hazelcast.flush-mode=on-save
Sessions flush mode. Determines when session changes are written to the session store. |
spring.session.hazelcast.map-name=spring:session:sessions
Name of the map used to store sessions. |
spring.session.hazelcast.map-name=spring:session:sessions
Name of the map used to store sessions. |
spring.session.hazelcast.save-mode=on-set-attribute
Sessions save mode. Determines how session changes are tracked and saved to the session store. |
spring.session.hazelcast.save-mode=on-set-attribute
Sessions save mode. Determines how session changes are tracked and saved to the session store. |
Configuration Metadata
The collection of configuration properties listed in this section are automatically generated from the CAS source and components that contain the actual field definitions, types, descriptions, modules, etc. This metadata may not always be 100% accurate, or could be lacking details and sufficient explanations.
Be Selective
This section is meant as a guide only. Do NOT copy/paste the entire collection of settings into your CAS configuration; rather pick only the properties that you need. Do NOT enable settings unless you are certain of their purpose and do NOT copy settings into your configuration only to keep them as reference. All these ideas lead to upgrade headaches, maintenance nightmares and premature aging.
YAGNI
Note that for nearly ALL use cases, declaring and configuring properties listed here is sufficient. You should NOT have to explicitly massage a CAS XML/Java/etc configuration file to design an authentication handler, create attribute release policies, etc. CAS at runtime will auto-configure all required changes for you. If you are unsure about the meaning of a given CAS setting, do NOT turn it on without hesitation. Review the codebase or better yet, ask questions to clarify the intended behavior.
Naming Convention
Property names can be specified in very relaxed terms. For instance cas.someProperty, cas.some-property, cas.some_property are all valid names. While all forms are accepted by CAS, there are certain components (in CAS and other frameworks used) whose activation at runtime is conditional on a property value, where this property is required to have been specified in CAS configuration using kebab case. This is both true for properties that are owned by CAS as well as those that might be presented to the system via an external library or framework such as Spring Boot, etc. When possible, properties should be stored in
lower-case kebab format, such as cas.property-name=value.S ettings and properties that are controlled by the CAS platform directly always begin with the prefix cas. All other settings are controlled and provided to CAS via other underlying frameworks and may have their own schemas and syntax. BE CAREFUL with the distinction. Unrecognized properties are rejected by CAS and/or frameworks upon which CAS depends. This means if you somehow misspell a property definition or fail to adhere to the dot-notation syntax and such, your setting is entirely refused by CAS and likely the feature it controls will never be activated in the way you intend.
Validation
Configuration properties are automatically validated on CAS startup to report issues with configuration binding, specially if defined CAS settings cannot be recognized or validated by the configuration schema. The validation process is on by default and can be skipped on startup using a special system property SKIP_CONFIG_VALIDATION that should be set to true. Additional validation processes are also handled via Configuration Metadata and property migrations applied automatically on startup by Spring Boot and family.
Indexed Settings
CAS settings able to accept multiple values are typically documented with an index, such as cas.some.setting[0]=value. The index [0] is meant to be incremented by the adopter to allow for distinct multiple configuration blocks.
Redis Session Replication
If you don’t wish to use the native container’s strategy for session replication, you can use CAS’s support for Redis session replication.
This feature is enabled via the following module:
1
2
3
4
5
<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-support-session-redis</artifactId>
<version>${cas.version}</version>
</dependency>
1
implementation "org.apereo.cas:cas-server-support-session-redis:${project.'cas.version'}"
1
2
3
4
5
6
7
8
9
dependencyManagement {
imports {
mavenBom "org.apereo.cas:cas-server-support-bom:${project.'cas.version'}"
}
}
dependencies {
implementation "org.apereo.cas:cas-server-support-session-redis"
}
The following settings and properties are available from the CAS configuration catalog:
spring.redis.client-name=
Client name to be set on connections with CLIENT SETNAME. |
spring.redis.client-type=
Type of client to use. By default, auto-detected according to the classpath. |
spring.redis.cluster.max-redirects=
Maximum number of redirects to follow when executing commands across the cluster. |
spring.redis.cluster.nodes=
Comma-separated list of "host:port" pairs to bootstrap from. This represents an "initial" list of cluster nodes and is required to have at least one entry. |
spring.redis.connect-timeout=
Connection timeout. |
spring.redis.database=0
Database index used by the connection factory. |
spring.redis.host=localhost
Redis server host. |
spring.redis.jedis.pool.max-active=8
Maximum number of connections that can be allocated by the pool at a given time. Use a negative value for no limit. |
spring.redis.jedis.pool.max-idle=8
Maximum number of "idle" connections in the pool. Use a negative value to indicate an unlimited number of idle connections. |
spring.redis.jedis.pool.max-wait=-1ms
Maximum amount of time a connection allocation should block before throwing an exception when the pool is exhausted. Use a negative value to block indefinitely. |
spring.redis.jedis.pool.min-idle=0
Target for the minimum number of idle connections to maintain in the pool. This setting only has an effect if both it and time between eviction runs are positive. |
spring.redis.jedis.pool.time-between-eviction-runs=
Time between runs of the idle object evictor thread. When positive, the idle object evictor thread starts, otherwise no idle object eviction is performed. |
spring.redis.lettuce.cluster.refresh.adaptive=false
Whether adaptive topology refreshing using all available refresh triggers should be used. |
spring.redis.lettuce.cluster.refresh.dynamic-refresh-sources=true
Whether to discover and query all cluster nodes for obtaining the cluster topology. When set to false, only the initial seed nodes are used as sources for topology discovery. |
spring.redis.lettuce.cluster.refresh.period=
Cluster topology refresh period. |
spring.redis.lettuce.pool.max-active=8
Maximum number of connections that can be allocated by the pool at a given time. Use a negative value for no limit. |
spring.redis.lettuce.pool.max-idle=8
Maximum number of "idle" connections in the pool. Use a negative value to indicate an unlimited number of idle connections. |
spring.redis.lettuce.pool.max-wait=-1ms
Maximum amount of time a connection allocation should block before throwing an exception when the pool is exhausted. Use a negative value to block indefinitely. |
spring.redis.lettuce.pool.min-idle=0
Target for the minimum number of idle connections to maintain in the pool. This setting only has an effect if both it and time between eviction runs are positive. |
spring.redis.lettuce.pool.time-between-eviction-runs=
Time between runs of the idle object evictor thread. When positive, the idle object evictor thread starts, otherwise no idle object eviction is performed. |
spring.redis.lettuce.shutdown-timeout=100ms
Shutdown timeout. |
spring.redis.password=
Login password of the redis server. |
spring.redis.port=6379
Redis server port. |
spring.redis.sentinel.master=
Name of the Redis server. |
spring.redis.sentinel.nodes=
Comma-separated list of "host:port" pairs. |
spring.redis.sentinel.password=
Password for authenticating with sentinel(s). |
spring.redis.ssl=false
Whether to enable SSL support. |
spring.redis.timeout=
Read timeout. |
spring.redis.url=
Connection URL. Overrides host, port, and password. User is ignored. Example: redis://user:password@example.com:6379 |
spring.redis.username=
Login username of the redis server. |
spring.session.redis.cleanup-cron=0 * * * * *
Cron expression for expired session cleanup job. |
spring.session.redis.configure-action=notify-keyspace-events
The configure action to apply when no user defined ConfigureRedisAction bean is present. |
spring.session.redis.flush-mode=on-save
Sessions flush mode. Determines when session changes are written to the session store. |
spring.session.redis.namespace=spring:session
Namespace for keys used to store sessions. |
spring.session.redis.save-mode=on-set-attribute
Sessions save mode. Determines how session changes are tracked and saved to the session store. |
Configuration Metadata
The collection of configuration properties listed in this section are automatically generated from the CAS source and components that contain the actual field definitions, types, descriptions, modules, etc. This metadata may not always be 100% accurate, or could be lacking details and sufficient explanations.
Be Selective
This section is meant as a guide only. Do NOT copy/paste the entire collection of settings into your CAS configuration; rather pick only the properties that you need. Do NOT enable settings unless you are certain of their purpose and do NOT copy settings into your configuration only to keep them as reference. All these ideas lead to upgrade headaches, maintenance nightmares and premature aging.
YAGNI
Note that for nearly ALL use cases, declaring and configuring properties listed here is sufficient. You should NOT have to explicitly massage a CAS XML/Java/etc configuration file to design an authentication handler, create attribute release policies, etc. CAS at runtime will auto-configure all required changes for you. If you are unsure about the meaning of a given CAS setting, do NOT turn it on without hesitation. Review the codebase or better yet, ask questions to clarify the intended behavior.
Naming Convention
Property names can be specified in very relaxed terms. For instance cas.someProperty, cas.some-property, cas.some_property are all valid names. While all forms are accepted by CAS, there are certain components (in CAS and other frameworks used) whose activation at runtime is conditional on a property value, where this property is required to have been specified in CAS configuration using kebab case. This is both true for properties that are owned by CAS as well as those that might be presented to the system via an external library or framework such as Spring Boot, etc. When possible, properties should be stored in
lower-case kebab format, such as cas.property-name=value.S ettings and properties that are controlled by the CAS platform directly always begin with the prefix cas. All other settings are controlled and provided to CAS via other underlying frameworks and may have their own schemas and syntax. BE CAREFUL with the distinction. Unrecognized properties are rejected by CAS and/or frameworks upon which CAS depends. This means if you somehow misspell a property definition or fail to adhere to the dot-notation syntax and such, your setting is entirely refused by CAS and likely the feature it controls will never be activated in the way you intend.
Validation
Configuration properties are automatically validated on CAS startup to report issues with configuration binding, specially if defined CAS settings cannot be recognized or validated by the configuration schema. The validation process is on by default and can be skipped on startup using a special system property SKIP_CONFIG_VALIDATION that should be set to true. Additional validation processes are also handled via Configuration Metadata and property migrations applied automatically on startup by Spring Boot and family.
Indexed Settings
CAS settings able to accept multiple values are typically documented with an index, such as cas.some.setting[0]=value. The index [0] is meant to be incremented by the adopter to allow for distinct multiple configuration blocks.
MongoDb Session Replication
If you don’t wish to use the native container’s strategy for session replication, you can use CAS’s support for Mongo session replication.
This feature is enabled via the following module:
1
2
3
4
5
<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-support-session-mongo</artifactId>
<version>${cas.version}</version>
</dependency>
1
implementation "org.apereo.cas:cas-server-support-session-mongo:${project.'cas.version'}"
1
2
3
4
5
6
7
8
9
dependencyManagement {
imports {
mavenBom "org.apereo.cas:cas-server-support-bom:${project.'cas.version'}"
}
}
dependencies {
implementation "org.apereo.cas:cas-server-support-session-mongo"
}
The following settings and properties are available from the CAS configuration catalog:
spring.data.mongodb.authentication-database=
Authentication database name. |
spring.data.mongodb.auto-index-creation=
Whether to enable auto-index creation. |
spring.data.mongodb.database=
Database name. |
spring.data.mongodb.field-naming-strategy=
Fully qualified name of the FieldNamingStrategy to use. |
spring.data.mongodb.grid-fs-database=
Deprecation status is |
spring.data.mongodb.gridfs.bucket=
GridFS bucket name. |
spring.data.mongodb.gridfs.database=
GridFS database name. |
spring.data.mongodb.host=
Mongo server host. Cannot be set with URI. |
spring.data.mongodb.password=
Login password of the mongo server. Cannot be set with URI. |
spring.data.mongodb.port=
Mongo server port. Cannot be set with URI. |
spring.data.mongodb.replica-set-name=
Required replica set name for the cluster. Cannot be set with URI. |
spring.data.mongodb.repositories.type=auto
Type of Mongo repositories to enable. |
spring.data.mongodb.uri=mongodb://localhost/test
Mongo database URI. Cannot be set with host, port, credentials and replica set name. |
spring.data.mongodb.username=
Login user of the mongo server. Cannot be set with URI. |
spring.data.mongodb.uuid-representation=java-legacy
Representation to use when converting a UUID to a BSON binary value. |
spring.session.mongodb.collection-name=sessions
Collection name used to store sessions. |
Configuration Metadata
The collection of configuration properties listed in this section are automatically generated from the CAS source and components that contain the actual field definitions, types, descriptions, modules, etc. This metadata may not always be 100% accurate, or could be lacking details and sufficient explanations.
Be Selective
This section is meant as a guide only. Do NOT copy/paste the entire collection of settings into your CAS configuration; rather pick only the properties that you need. Do NOT enable settings unless you are certain of their purpose and do NOT copy settings into your configuration only to keep them as reference. All these ideas lead to upgrade headaches, maintenance nightmares and premature aging.
YAGNI
Note that for nearly ALL use cases, declaring and configuring properties listed here is sufficient. You should NOT have to explicitly massage a CAS XML/Java/etc configuration file to design an authentication handler, create attribute release policies, etc. CAS at runtime will auto-configure all required changes for you. If you are unsure about the meaning of a given CAS setting, do NOT turn it on without hesitation. Review the codebase or better yet, ask questions to clarify the intended behavior.
Naming Convention
Property names can be specified in very relaxed terms. For instance cas.someProperty, cas.some-property, cas.some_property are all valid names. While all forms are accepted by CAS, there are certain components (in CAS and other frameworks used) whose activation at runtime is conditional on a property value, where this property is required to have been specified in CAS configuration using kebab case. This is both true for properties that are owned by CAS as well as those that might be presented to the system via an external library or framework such as Spring Boot, etc. When possible, properties should be stored in
lower-case kebab format, such as cas.property-name=value.S ettings and properties that are controlled by the CAS platform directly always begin with the prefix cas. All other settings are controlled and provided to CAS via other underlying frameworks and may have their own schemas and syntax. BE CAREFUL with the distinction. Unrecognized properties are rejected by CAS and/or frameworks upon which CAS depends. This means if you somehow misspell a property definition or fail to adhere to the dot-notation syntax and such, your setting is entirely refused by CAS and likely the feature it controls will never be activated in the way you intend.
Validation
Configuration properties are automatically validated on CAS startup to report issues with configuration binding, specially if defined CAS settings cannot be recognized or validated by the configuration schema. The validation process is on by default and can be skipped on startup using a special system property SKIP_CONFIG_VALIDATION that should be set to true. Additional validation processes are also handled via Configuration Metadata and property migrations applied automatically on startup by Spring Boot and family.
Indexed Settings
CAS settings able to accept multiple values are typically documented with an index, such as cas.some.setting[0]=value. The index [0] is meant to be incremented by the adopter to allow for distinct multiple configuration blocks.
JDBC Session Replication
If you don’t wish to use the native container’s strategy for session replication, you can use CAS’s support for JDBC session replication.
This feature is enabled via the following module:
1
2
3
4
5
<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-support-session-jdbc</artifactId>
<version>${cas.version}</version>
</dependency>
1
implementation "org.apereo.cas:cas-server-support-session-jdbc:${project.'cas.version'}"
1
2
3
4
5
6
7
8
9
dependencyManagement {
imports {
mavenBom "org.apereo.cas:cas-server-support-bom:${project.'cas.version'}"
}
}
dependencies {
implementation "org.apereo.cas:cas-server-support-session-jdbc"
}
The following settings and properties are available from the CAS configuration catalog:
spring.datasource.continue-on-error=false
Whether to stop if an error occurs while initializing the database. Deprecation status is |
spring.datasource.data=
Data (DML) script resource references. Deprecation status is |
spring.datasource.data-password=
Password of the database to execute DML scripts (if different). Deprecation status is |
spring.datasource.data-username=
Username of the database to execute DML scripts (if different). Deprecation status is |
spring.datasource.dbcp2.abandoned-usage-tracking=
|
spring.datasource.dbcp2.access-to-underlying-connection-allowed=
|
spring.datasource.dbcp2.auto-commit-on-return=
|
spring.datasource.dbcp2.cache-state=
|
spring.datasource.dbcp2.clear-statement-pool-on-return=
|
spring.datasource.dbcp2.connection-factory-class-name=
|
spring.datasource.dbcp2.connection-init-sqls=
|
spring.datasource.dbcp2.default-auto-commit=
|
spring.datasource.dbcp2.default-catalog=
|
spring.datasource.dbcp2.default-query-timeout=
|
spring.datasource.dbcp2.default-read-only=
|
spring.datasource.dbcp2.default-schema=
|
spring.datasource.dbcp2.default-transaction-isolation=
|
spring.datasource.dbcp2.disconnection-sql-codes=
|
spring.datasource.dbcp2.driver=
|
spring.datasource.dbcp2.driver-class-name=
|
spring.datasource.dbcp2.enable-auto-commit-on-return=
Deprecation status is |
spring.datasource.dbcp2.eviction-policy-class-name=
|
spring.datasource.dbcp2.fast-fail-validation=
|
spring.datasource.dbcp2.initial-size=
|
spring.datasource.dbcp2.jmx-name=
|
spring.datasource.dbcp2.lifo=
|
spring.datasource.dbcp2.log-abandoned=
|
spring.datasource.dbcp2.log-expired-connections=
|
spring.datasource.dbcp2.login-timeout=
|
spring.datasource.dbcp2.max-conn-lifetime-millis=
|
spring.datasource.dbcp2.max-idle=
|
spring.datasource.dbcp2.max-open-prepared-statements=
|
spring.datasource.dbcp2.max-total=
|
spring.datasource.dbcp2.max-wait-millis=
|
spring.datasource.dbcp2.min-evictable-idle-time-millis=
|
spring.datasource.dbcp2.min-idle=
|
spring.datasource.dbcp2.num-tests-per-eviction-run=
|
spring.datasource.dbcp2.password=
|
spring.datasource.dbcp2.pool-prepared-statements=
|
spring.datasource.dbcp2.remove-abandoned-on-borrow=
|
spring.datasource.dbcp2.remove-abandoned-on-maintenance=
|
spring.datasource.dbcp2.remove-abandoned-timeout=
|
spring.datasource.dbcp2.rollback-on-return=
|
spring.datasource.dbcp2.soft-min-evictable-idle-time-millis=
|
spring.datasource.dbcp2.test-on-borrow=
|
spring.datasource.dbcp2.test-on-create=
|
spring.datasource.dbcp2.test-on-return=
|
spring.datasource.dbcp2.test-while-idle=
|
spring.datasource.dbcp2.time-between-eviction-runs-millis=
|
spring.datasource.dbcp2.url=
|
spring.datasource.dbcp2.username=
|
spring.datasource.dbcp2.validation-query=
|
spring.datasource.dbcp2.validation-query-timeout=
|
spring.datasource.driver-class-name=
Fully qualified name of the JDBC driver. Auto-detected based on the URL by default. |
spring.datasource.embedded-database-connection=
Connection details for an embedded database. Defaults to the most suitable embedded database that is available on the classpath. |
spring.datasource.generate-unique-name=true
Whether to generate a random datasource name. |
spring.datasource.hikari.allow-pool-suspension=
|
spring.datasource.hikari.auto-commit=
|
spring.datasource.hikari.catalog=
|
spring.datasource.hikari.connection-init-sql=
|
spring.datasource.hikari.connection-test-query=
|
spring.datasource.hikari.connection-timeout=
|
spring.datasource.hikari.data-source-class-name=
|
spring.datasource.hikari.data-source-j-n-d-i=
|
spring.datasource.hikari.data-source-properties=
|
spring.datasource.hikari.driver-class-name=
|
spring.datasource.hikari.exception-override-class-name=
|
spring.datasource.hikari.health-check-properties=
|
spring.datasource.hikari.health-check-registry=
|
spring.datasource.hikari.idle-timeout=
|
spring.datasource.hikari.initialization-fail-timeout=
|
spring.datasource.hikari.isolate-internal-queries=
|
spring.datasource.hikari.jdbc-url=
|
spring.datasource.hikari.keepalive-time=
|
spring.datasource.hikari.leak-detection-threshold=
|
spring.datasource.hikari.login-timeout=
|
spring.datasource.hikari.max-lifetime=
|
spring.datasource.hikari.maximum-pool-size=
|
spring.datasource.hikari.metric-registry=
|
spring.datasource.hikari.metrics-tracker-factory=
|
spring.datasource.hikari.minimum-idle=
|
spring.datasource.hikari.password=
|
spring.datasource.hikari.pool-name=
|
spring.datasource.hikari.read-only=
|
spring.datasource.hikari.register-mbeans=
|
spring.datasource.hikari.scheduled-executor=
|
spring.datasource.hikari.schema=
|
spring.datasource.hikari.transaction-isolation=
|
spring.datasource.hikari.username=
|
spring.datasource.hikari.validation-timeout=
|
spring.datasource.initialization-mode=embedded
Mode to apply when determining if DataSource initialization should be performed using the available DDL and DML scripts. Deprecation status is |
spring.datasource.jmx-enabled=false
Whether to enable JMX support (if provided by the underlying pool). Deprecation status is |
spring.datasource.jndi-name=
JNDI location of the datasource. Class, url, username and password are ignored when set. |
spring.datasource.name=
Datasource name to use if "generate-unique-name" is false. Defaults to "testdb" when using an embedded database, otherwise null. |
spring.datasource.oracleucp.abandoned-connection-timeout=
|
spring.datasource.oracleucp.connection-factory-class-name=
|
spring.datasource.oracleucp.connection-factory-properties=
|
spring.datasource.oracleucp.connection-harvest-max-count=
|
spring.datasource.oracleucp.connection-harvest-trigger-count=
|
spring.datasource.oracleucp.connection-labeling-high-cost=
|
spring.datasource.oracleucp.connection-pool-name=
|
spring.datasource.oracleucp.connection-properties=
|
spring.datasource.oracleucp.connection-repurpose-threshold=
|
spring.datasource.oracleucp.connection-validation-timeout=
|
spring.datasource.oracleucp.connection-wait-timeout=
|
spring.datasource.oracleucp.data-source-name=
|
spring.datasource.oracleucp.database-name=
|
spring.datasource.oracleucp.description=
|
spring.datasource.oracleucp.fast-connection-failover-enabled=
|
spring.datasource.oracleucp.high-cost-connection-reuse-threshold=
|
spring.datasource.oracleucp.inactive-connection-timeout=
|
spring.datasource.oracleucp.initial-pool-size=
|
spring.datasource.oracleucp.login-timeout=
|
spring.datasource.oracleucp.max-connection-reuse-count=
|
spring.datasource.oracleucp.max-connection-reuse-time=
|
spring.datasource.oracleucp.max-connections-per-shard=
|
spring.datasource.oracleucp.max-idle-time=
|
spring.datasource.oracleucp.max-pool-size=
|
spring.datasource.oracleucp.max-statements=
|
spring.datasource.oracleucp.min-pool-size=
|
spring.datasource.oracleucp.network-protocol=
|
spring.datasource.oracleucp.o-n-s-configuration=
|
spring.datasource.oracleucp.password=
|
spring.datasource.oracleucp.pdb-roles=
|
spring.datasource.oracleucp.port-number=
|
spring.datasource.oracleucp.property-cycle=
|
spring.datasource.oracleucp.query-timeout=
|
spring.datasource.oracleucp.read-only-instance-allowed=
|
spring.datasource.oracleucp.role-name=
|
spring.datasource.oracleucp.s-q-l-for-validate-connection=
|
spring.datasource.oracleucp.seconds-to-trust-idle-connection=
|
spring.datasource.oracleucp.server-name=
|
spring.datasource.oracleucp.sharding-mode=
|
spring.datasource.oracleucp.time-to-live-connection-timeout=
|
spring.datasource.oracleucp.timeout-check-interval=
|
spring.datasource.oracleucp.u-r-l=
|
spring.datasource.oracleucp.user=
|
spring.datasource.oracleucp.validate-connection-on-borrow=
|
spring.datasource.password=
Login password of the database. |
spring.datasource.platform=all
Platform to use in the DDL or DML scripts (such as schema-${platform}.sql or data-${platform}.sql). Deprecation status is |
spring.datasource.schema=
Schema (DDL) script resource references. Deprecation status is |
spring.datasource.schema-password=
Password of the database to execute DDL scripts (if different). Deprecation status is |
spring.datasource.schema-username=
Username of the database to execute DDL scripts (if different). Deprecation status is |
spring.datasource.separator=;
Statement separator in SQL initialization scripts. Deprecation status is |
spring.datasource.sql-script-encoding=
SQL scripts encoding. Deprecation status is |
spring.datasource.tomcat.abandon-when-percentage-full=
|
spring.datasource.tomcat.access-to-underlying-connection-allowed=
|
spring.datasource.tomcat.alternate-username-allowed=
|
spring.datasource.tomcat.commit-on-return=
|
spring.datasource.tomcat.connection-properties=
|
spring.datasource.tomcat.data-source=
|
spring.datasource.tomcat.data-source-j-n-d-i=
|
spring.datasource.tomcat.db-properties=
|
spring.datasource.tomcat.default-auto-commit=
|
spring.datasource.tomcat.default-catalog=
|
spring.datasource.tomcat.default-read-only=
|
spring.datasource.tomcat.default-transaction-isolation=
|
spring.datasource.tomcat.driver-class-name=
|
spring.datasource.tomcat.fair-queue=
|
spring.datasource.tomcat.ignore-exception-on-pre-load=
|
spring.datasource.tomcat.init-s-q-l=
|
spring.datasource.tomcat.initial-size=
|
spring.datasource.tomcat.jdbc-interceptors=
|
spring.datasource.tomcat.jmx-enabled=
|
spring.datasource.tomcat.log-abandoned=
|
spring.datasource.tomcat.log-validation-errors=
|
spring.datasource.tomcat.login-timeout=
|
spring.datasource.tomcat.max-active=
|
spring.datasource.tomcat.max-age=
|
spring.datasource.tomcat.max-idle=
|
spring.datasource.tomcat.max-wait=
|
spring.datasource.tomcat.min-evictable-idle-time-millis=
|
spring.datasource.tomcat.min-idle=
|
spring.datasource.tomcat.name=
|
spring.datasource.tomcat.num-tests-per-eviction-run=
|
spring.datasource.tomcat.password=
|
spring.datasource.tomcat.propagate-interrupt-state=
|
spring.datasource.tomcat.remove-abandoned=
|
spring.datasource.tomcat.remove-abandoned-timeout=
|
spring.datasource.tomcat.rollback-on-return=
|
spring.datasource.tomcat.suspect-timeout=
|
spring.datasource.tomcat.test-on-borrow=
|
spring.datasource.tomcat.test-on-connect=
|
spring.datasource.tomcat.test-on-return=
|
spring.datasource.tomcat.test-while-idle=
|
spring.datasource.tomcat.time-between-eviction-runs-millis=
|
spring.datasource.tomcat.url=
|
spring.datasource.tomcat.use-disposable-connection-facade=
|
spring.datasource.tomcat.use-equals=
|
spring.datasource.tomcat.use-lock=
|
spring.datasource.tomcat.use-statement-facade=
|
spring.datasource.tomcat.username=
|
spring.datasource.tomcat.validation-interval=
|
spring.datasource.tomcat.validation-query=
|
spring.datasource.tomcat.validation-query-timeout=
|
spring.datasource.tomcat.validator-class-name=
|
spring.datasource.type=
Fully qualified name of the connection pool implementation to use. By default, it is auto-detected from the classpath. |
spring.datasource.url=
JDBC URL of the database. |
spring.datasource.username=
Login username of the database. |
spring.datasource.xa.data-source-class-name=
XA datasource fully qualified name. |
spring.datasource.xa.properties=
Properties to pass to the XA data source. |
spring.session.jdbc.cleanup-cron=0 * * * * *
Cron expression for expired session cleanup job. |
spring.session.jdbc.flush-mode=on-save
Sessions flush mode. Determines when session changes are written to the session store. |
spring.session.jdbc.initialize-schema=embedded
Database schema initialization mode. |
spring.session.jdbc.save-mode=on-set-attribute
Sessions save mode. Determines how session changes are tracked and saved to the session store. |
spring.session.jdbc.schema=classpath:org/springframework/session/jdbc/schema-@@platform@@.sql
Path to the SQL file to use to initialize the database schema. |
spring.session.jdbc.table-name=SPRING_SESSION
Name of the database table used to store sessions. |
Configuration Metadata
The collection of configuration properties listed in this section are automatically generated from the CAS source and components that contain the actual field definitions, types, descriptions, modules, etc. This metadata may not always be 100% accurate, or could be lacking details and sufficient explanations.
Be Selective
This section is meant as a guide only. Do NOT copy/paste the entire collection of settings into your CAS configuration; rather pick only the properties that you need. Do NOT enable settings unless you are certain of their purpose and do NOT copy settings into your configuration only to keep them as reference. All these ideas lead to upgrade headaches, maintenance nightmares and premature aging.
YAGNI
Note that for nearly ALL use cases, declaring and configuring properties listed here is sufficient. You should NOT have to explicitly massage a CAS XML/Java/etc configuration file to design an authentication handler, create attribute release policies, etc. CAS at runtime will auto-configure all required changes for you. If you are unsure about the meaning of a given CAS setting, do NOT turn it on without hesitation. Review the codebase or better yet, ask questions to clarify the intended behavior.
Naming Convention
Property names can be specified in very relaxed terms. For instance cas.someProperty, cas.some-property, cas.some_property are all valid names. While all forms are accepted by CAS, there are certain components (in CAS and other frameworks used) whose activation at runtime is conditional on a property value, where this property is required to have been specified in CAS configuration using kebab case. This is both true for properties that are owned by CAS as well as those that might be presented to the system via an external library or framework such as Spring Boot, etc. When possible, properties should be stored in
lower-case kebab format, such as cas.property-name=value.S ettings and properties that are controlled by the CAS platform directly always begin with the prefix cas. All other settings are controlled and provided to CAS via other underlying frameworks and may have their own schemas and syntax. BE CAREFUL with the distinction. Unrecognized properties are rejected by CAS and/or frameworks upon which CAS depends. This means if you somehow misspell a property definition or fail to adhere to the dot-notation syntax and such, your setting is entirely refused by CAS and likely the feature it controls will never be activated in the way you intend.
Validation
Configuration properties are automatically validated on CAS startup to report issues with configuration binding, specially if defined CAS settings cannot be recognized or validated by the configuration schema. The validation process is on by default and can be skipped on startup using a special system property SKIP_CONFIG_VALIDATION that should be set to true. Additional validation processes are also handled via Configuration Metadata and property migrations applied automatically on startup by Spring Boot and family.
Indexed Settings
CAS settings able to accept multiple values are typically documented with an index, such as cas.some.setting[0]=value. The index [0] is meant to be incremented by the adopter to allow for distinct multiple configuration blocks.